package cqrtplm.mapper;

import cqrtplm.entity.RatoCpytDO;
import cqrtplm.entity.RtPrimaryPurpose;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RatoCpytMapper {
    int insert(RatoCpytDO record);
    int deleteById(String id);
    int update(RatoCpytDO record);
    RatoCpytDO selectById(String id);
    List<RatoCpytDO> selectByCondition(RatoCpytDO condition);
    String selectPrimaryPurpose(String primaryPurpose);

    @Select("select USAGE_CODE as usageCode from RT_CFG_CPYT where SECONDARY_USAGE=#{productusage}")
    String selectUsageCodeByName(@Param("productusage") String productusage);
}